package com.example.studyplanning.servicesImpl;

import com.example.studyplanning.entity.Message;
import com.example.studyplanning.mapper.MessageMapper;
import com.example.studyplanning.services.MessageServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageServicesImpl implements MessageServices {
    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<Message> findAllMessage(Integer tipsID) {
        return messageMapper.findAllMessage(tipsID);
    }

    @Override
    public Integer insertMessage(Message message) {
        return messageMapper.insertMessage(message);
    }

    @Override
    public List<Message> SelectByID(Integer userID) {
        return messageMapper.SelectByID(userID);
    }

    @Override
    public Integer DelByID(Integer messageID) {
        return messageMapper.DelByID(messageID);
    }

    @Override
    public List<Message> SelectMessage(Integer tipsID, Integer userID, Integer messageID) {
        return messageMapper.SelectMessage(tipsID,userID,messageID);
    }

    @Override
    public List<Message> CountDayMessage() {
        List<Message>list=messageMapper.CountDayMessage();
        return list;
    }

}
